Optimal. Leaf size=75 \[ -\frac{b \log (a+b \sin (c+d x))}{d \left (a^2-b^2\right )}-\frac{\log (1-\sin (c+d x))}{2 d (a+b)}+\frac{\log (\sin (c+d x)+1)}{2 d (a-b)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.080833, antiderivative size = 75, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.21, Rules used = {2668, 706, 31, 633} \[ -\frac{b \log (a+b \sin (c+d x))}{d \left (a^2-b^2\right )}-\frac{\log (1-\sin (c+d x))}{2 d (a+b)}+\frac{\log (\sin (c+d x)+1)}{2 d (a-b)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2668
Rule 706
Rule 31
Rule 633
Rubi steps
\begin{align*} \int \frac{\sec (c+d x)}{a+b \sin (c+d x)} \, dx &=\frac{b \operatorname{Subst}\left (\int \frac{1}{(a+x) \left (b^2-x^2\right )} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac{b \operatorname{Subst}\left (\int \frac{1}{a+x} \, dx,x,b \sin (c+d x)\right )}{\left (a^2-b^2\right ) d}-\frac{b \operatorname{Subst}\left (\int \frac{-a+x}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{\left (a^2-b^2\right ) d}\\ &=-\frac{b \log (a+b \sin (c+d x))}{\left (a^2-b^2\right ) d}-\frac{\operatorname{Subst}\left (\int \frac{1}{-b-x} \, dx,x,b \sin (c+d x)\right )}{2 (a-b) d}+\frac{\operatorname{Subst}\left (\int \frac{1}{b-x} \, dx,x,b \sin (c+d x)\right )}{2 (a+b) d}\\ &=-\frac{\log (1-\sin (c+d x))}{2 (a+b) d}+\frac{\log (1+\sin (c+d x))}{2 (a-b) d}-\frac{b \log (a+b \sin (c+d x))}{\left (a^2-b^2\right ) d}\\ \end{align*}
Mathematica [A] time = 0.0609976, size = 64, normalized size = 0.85 \[ \frac{(b-a) \log (1-\sin (c+d x))+(a+b) \log (\sin (c+d x)+1)-2 b \log (a+b \sin (c+d x))}{2 d (a-b) (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.002, size = 76, normalized size = 1. \begin{align*} -{\frac{b\ln \left ( a+b\sin \left ( dx+c \right ) \right ) }{d \left ( a-b \right ) \left ( a+b \right ) }}-{\frac{\ln \left ( \sin \left ( dx+c \right ) -1 \right ) }{d \left ( 2\,a+2\,b \right ) }}+{\frac{\ln \left ( 1+\sin \left ( dx+c \right ) \right ) }{d \left ( 2\,a-2\,b \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.946195, size = 86, normalized size = 1.15 \begin{align*} -\frac{\frac{2 \, b \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{2} - b^{2}} - \frac{\log \left (\sin \left (d x + c\right ) + 1\right )}{a - b} + \frac{\log \left (\sin \left (d x + c\right ) - 1\right )}{a + b}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.25565, size = 158, normalized size = 2.11 \begin{align*} -\frac{2 \, b \log \left (b \sin \left (d x + c\right ) + a\right ) -{\left (a + b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) +{\left (a - b\right )} \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \,{\left (a^{2} - b^{2}\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec{\left (c + d x \right )}}{a + b \sin{\left (c + d x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.19167, size = 96, normalized size = 1.28 \begin{align*} -\frac{\frac{2 \, b^{2} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{2} b - b^{3}} - \frac{\log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a - b} + \frac{\log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a + b}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]